package com.coolwen.springmvc.service;

import com.coolwen.springmvc.model.Group;
import com.coolwen.springmvc.model.User;
import com.coolwen.springmvc.model.UserGroupDto;

import java.util.List;

/**
 * @author CoolWen
 * @version 2018-10-12 10:55
 */
public interface UserService {
    public void add(User u, int gid);

    public void delete(int id);

    public void update(User u, int gid);

    public User load(int id);

    public List<UserGroupDto> listAllUser();

    public List<User> listByGroup(int gid);

    public User login(String username, String password);

    public void addGroupAndUser(Group group, User user);
}
